import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import DTO.LocaldataDTO;
import method.UserinfoCreate;
import javax.servlet.ServletException;
@WebServlet(urlPatterns = {"/register"})
public class RegisterServlet extends HttpServlet{
    protected void doPost(HttpServletRequest req,
                          HttpServletResponse resp) throws IOException ,ServletException{
        String arr0,arr1,arr2,arr3,arr4;
        arr0=req.getParameter("userid");
        arr1=req.getParameter("password");
        arr2=req.getParameter("localname");
        arr3=req.getParameter("phone");
        arr4=req.getParameter("dgutid");
        UserinfoCreate userinfoCreate=new UserinfoCreate();
        userinfoCreate.setuser(arr0,arr1,arr2,arr3,arr4);
        LocaldataDTO localdataDTO=new LocaldataDTO(arr0,arr1,arr2,arr3,arr4);
        req.getSession().setAttribute("localdataDTO",localdataDTO);
        resp.sendRedirect("/HomePage.jsp");
    }
}
